<?php

class Application_Model_Service extends Application_Model_DomainObject {


	protected  $_id;

	protected $_username;

	protected $_createdate;

	protected $_storeno;

	protected $_qq;

	protected $_sername;

	protected $_content;
        
        protected $_comment;


        public static function getserFilter($quick,$dateinbegin,$dateinend,$pagesize, $pageindex)
        {
            $where = array();
            $and = '';
            if($quick != ''){
                $where[$and." ( username like "] = "%".$quick."%";
                $and = " or ";
                $where[$and." storeno = "] = $quick;
                $where[$and." qq = "] = $quick;
                $where[$and." sername like "] = "%".$quick."%";
                $where[") and "] = 1;
                $and = " and ";
            }
            if($dateinbegin != ''){
                $where[$and.' createdate >= '] = $dateinbegin;
                $and = ' and ';
            }
            if($dateinend != ''){
                $where[$and.' createdate <= '] = $dateinend;
                $and = ' and ';
            }
            return Application_Model_Service::getDao()->queryPage($where, ' id desc', $pagesize, $pageindex);
        }
}